/**
 * This file is a part of qloudgen-sec. 
 * You can redistribute qloudgen-sec and/or modify it under the terms of the Lesser GNU General Public License version 3. 
 * qloudgen-sec is distributed WITHOUT ANY WARRANTY. 
 *
 * See the Lesser GNU General Public License for more details at http://www.gnu.org/licenses/. 
 **/
package org.qloudgen.sec.cas.support.user.services;

import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;

import org.qloudgen.sec.cas.support.user.services.UserDetail;
//import net.vz.mongodb.jackson.Id;

/**
 * <p>Title:User </p>
 * <p>Description: User definition.</p>
 * <p>Copyright: qloudgen/sec 2011</p>
 * @author <a href="mailto:mikemaojun@gmail.com">mikemaojun</a>
 */
public class User {
	
	/**
	 *
	**/
	private String id = null;
	/**
	 *
	 */
	private String name = null;
	
	/**
	*
	*/
	private String password = null;
	/**
	 *
	 */
	private boolean isManageUser = false;
	/**
	 *
	 *
	**/
	private List<UserDetail> property= new ArrayList<UserDetail>();
	/**
	 *
	 *
	**/
	private HashMap<String,String> col = new HashMap<String,String>();
	/**
	 * Default constructor.
	 */
	public User() {
	}

	/**
	 *
	 */
	//@Id 
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 *
	 */
	//@Id
	public String getId() {
		return id;
	}
	/**
	 *
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 *
	 */
	public String getName() {
		return name;
	}
	/**
	 *
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 *
	 */
	public String getPassword() {
		return password;
	}
	/**
	 *
	 */
	public void setIsManageUser(boolean isManageUser) {
		this.isManageUser = isManageUser;
	}
	
	/**
	 * 
	 */
	public boolean getIsManageUser() {
		return isManageUser;
	}
	/**
	 *
	 *
  **/
  public void setProperty(List<UserDetail> property) {
  	this.property = property;
  }
	/**
	 *
	 *
  **/
  public List<UserDetail> getProperty() {
  	return property;
  }
  /**
	 *
	 *
  **/
  public void setCol(HashMap<String,String> col) {
  	this.col = col;
  }
	/**
	 *
	 *
  **/
  public HashMap<String,String> getCol() {
  	return col;
  }
	/**
	 * Output
	 *
	 * @return String
	 */
	@Override
	public String toString() {
		StringBuilder strs = new StringBuilder();
		strs.append( "[User-->" );
		strs.append( id ).append( ";" );
		strs.append( name ).append( ";" );
		strs.append( col ).append( ";" );
		strs.append( property ).append( ";" );
		strs.append( isManageUser );
		strs.append( "]" );
		//
		return strs.toString();
	}
}